package StudyCode.summary.myfile;

import java.io.File;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class AddFileSeparatorToEndOfPath {
	public static void main(String[] argv) {
		String path = "tah1986.com";
		System.out.println(addFileSeparatorToEndOfPath(path));
	}

	private static String addFileSeparatorToEndOfPath(String path) {
		if (path != null) {
			if (!path.endsWith(File.separator)) {
				return path += File.separator;
			} else {
				return path;
			}
		} else {
			return "";
		}
	}
}
